/*
 * ApplicationModel.java Created on Feb 16, 2003 11:05:00 AM
 *
 * Copyright (C) 2003 eRocX Software Group - www.erocx.com
 */
package com.erocx.c24;

/**
 * <p>Title: ApplicationModel</p>
 * <p>Description: the model save the application info</p>
  * 
 * @author		<a href="mailto:eroclu@gmail.com">Andy Lu</a>
 * @version   	1.0
 */

public final class ApplicationModel {
    private String userName;
    private int _a, _b, _c, _d;
    //private int score;
    private int win;
    private int lost;
    private int total;
    private String time;

    private boolean updated = false;

    public ApplicationModel(String name) {
        userName = name;
        //score = 0;
        win = 0;
        lost = 0;
        total = 0;
        time = TimeCounter.ORIGINALTIME;
    }

    public void update(boolean isWin) {
        total ++;
        if (isWin) {
            win ++;
        } else {
            lost ++;
        }
        updated = true;
    }

    public boolean isUpdated() {
        return updated;
    }

    public String getUserName() {
        return userName;
    }

/*
    public int getScore() {
        return score;
    }
*/

    public int getWin() {
        return win;
    }

    public int getLost() {
        return lost;
    }

    public int getTotal() {
        return total;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }
}